/* 
 * File:   DecoderPipleLine.h
 * Author: hao
 *
 * Created on 2011年5月18日, 下午10:09
 */

#ifndef DECODERPIPLELINE_H
#define	DECODERPIPLELINE_H

#include "DecoderManager.h"
#include "StreamOperationSlot.h"

class DecoderPipleLine {
    DecoderMaster * pMaster;

    StreamOperationSlot * pSlot;

    unsigned DecoderIndex;
    
    unsigned bFormat, channels, rate;

public:

    DecoderPipleLine(DecoderMaster * pmaster, StreamOperationSlot * pslot) : pMaster(pmaster), pSlot(pslot), DecoderIndex(0) {
    }

    bool operator()(void * pData, size_t len, size_t * pReadData);

    unsigned getDecoderIndex() const {
        return DecoderIndex;
    }

    void setDecoderIndex(unsigned Index) {
        DecoderIndex = Index;
    }
    
    void setStreamState( unsigned Format, unsigned Channels, unsigned Rate ){
        
        bFormat = Format;
        channels = Channels;
        rate = Rate;
        
    }
};

#endif	/* DECODERPIPLELINE_H */

